Skip to content

remove tag don't work correctly #3853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

remove tag don't work correctly #3853

wants to merge 1 commit into from

Conversation

kubanka-peter
Copy link

If you remove a tag and then add a tag, the removed one will be changed, if we add "new_" prefix in js, it will work fine. I think its need a little more explain in the doc, but my english is poor.

If you remove a tag and then add a tag, the removed one will be changed, if we add "new_" prefix, it will work fine. I think its need a little more explain in the doc, but my english is poor.
@wouterj
Copy link
Member

wouterj commented May 17, 2014

Hmm, can you clarify what you mean by "the removed one will be changed"?

I don't really follow the problem you encounter and I don't see how using the new_ prefix solves anything. More over, the prefix addition broke the code :)

I'll try to explain what this code does:

  • The number of elements is counted when the page is loaded, this count is set as the index data element on the collection holder. This happends on the line you choosed. (assume this is 3)
  • Whenever an input is added, this index data element is increased with one
  • Whenever you remove an input, the input is removed and the index data element remains unchanged.

See this JSfiddle for an example of the code: http://jsfiddle.net/847Kf/2/

@lyrixx
Copy link
Member

lyrixx commented May 19, 2014

@wouterj IIRC, js fiddle keeps forever a fiddle. Do you think it's a good idea to add you good fiddle to the doc?

@weaverryan
Copy link
Member

Hmm, I think that's a cool idea, with really now cost, since it would just be a small link.

@lyrixx
Copy link
Member

lyrixx commented May 20, 2014

s/now/no ? I'm not he only one to do that kind of mistake ;)

@wouterj
Copy link
Member

wouterj commented May 20, 2014

Hmm, JSfiddle promised to keep all JSfiddle until Beta, they didn't promise the rules after it (some say they keep hosting the snippets). Since JSfiddle is now in alpha, it might be a bit tricky...

But yeah, if I can make the example a little bit prettier, it'll be great to have in the docs indeed!

@lyrixx
Copy link
Member

lyrixx commented May 20, 2014

did not know that. But jsfiffle exists since 2009. They will stay in alpha for ever ;)

@weaverryan
Copy link
Member

@lyrixx ironically, I think I make more typos than most people :).

So what's the status then? Seems like this is not a real issue and we should close it. But then Wouter should also create a new PR when he has time linking to the jsfiddle?

weaverryan added a commit that referenced this pull request Aug 16, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

Added link to JSFiddle example

| Q   | A
| --- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | all
| Fixed tickets | #3853

Commits
-------

fe53a3f Added link to JSFiddle example
@weaverryan
Copy link
Member

I'm closing this - Wouter added a JSFiddle where you can play and modify the code.

@weaverryan weaverryan closed this Aug 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants